package com.common.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author lzl
 * @since 2022-09-01
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_goods")
@ApiModel(value = "Goods对象", description = "")
public class Goods implements Serializable {

    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty("类别id")
    private Integer typeId;

    @ApiModelProperty("商品名称")
    private String gname;

    @ApiModelProperty("商品图片")
    private String img;

    @ApiModelProperty("商品描述")
    private String description;

    @ApiModelProperty("商品规格id")
    private Integer gsid;

    @ApiModelProperty("商品品牌id")
    private Integer gbid;

    @ApiModelProperty("商品储藏id")
    private Integer gdid;

    @ApiModelProperty("商品编码")
    private Integer code;

    @ApiModelProperty("逻辑删除 1（true）已删除， 0（false）未删除")
    private Integer isDeleted;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:dd")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime gmtCreate;

    @ApiModelProperty("更新时间")


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:dd")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime gmtModified;
    @ApiModelProperty("手机号")
    private String mobile;

    @TableField("isAdd")
    private String isAdd;

}
